package com.tloss.bean;

import com.tloss.stdao.User;
import com.tloss.stdao.service.UserService;

public class LoginBean {
	User user;
	UserService service;

	public LoginBean() {
		service = new UserService();
	}

	public void setUser(User user) {
		this.user = user;
	}

	public User getUser() {
		return user;
	}

	public String login() {
		User user = service.select(this.user.getUsername());
		if (user != null) {
			return "success";
		}
		return "failt";
	}
}
